<template>
	<!--  #ifdef  MP-WEIXIN -->
	<view class="i-navTitleBar" :style="{paddingTop:  statusBarHeight + height + 'px'}"></view>
	<!--  #endif -->
	<!--  #ifdef  APP-PLUS -->
	<view class="i-navTitleBar" :style="{paddingTop: statusBarHeight + 'px'}"></view>
	<!--  #endif -->

</template>

<script lang="ts" setup>
	import { computed, defineProps } from "vue";
	import { getSystemInfoSync } from '../../utils/common'

	const props = defineProps({
		wxTop: {
			type: Boolean,
			default: true
		}
	})

	const { statusBarHeight } = getSystemInfoSync()
	// #ifdef  MP-WEIXIN

	const height = computed(() => {
		return props.wxTop ? wx.getMenuButtonBoundingClientRect().height : 0
	})
	// #endif
</script>

<style lang="scss" scoped>
	.i-navTitleBar {
		width: 100%;
	}
</style>